package c.e.a.b.e.c;

import android.util.Log;

/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class m2 extends l2<Long> {
    public m2(q2 q2Var, String str, Long l) {
        super(q2Var, str, l, true, null);
    }

    public final Object a(Object obj) {
        if (obj instanceof Long) {
            return (Long) obj;
        }
        if (obj instanceof String) {
            try {
                obj = Long.valueOf(Long.parseLong((String) obj));
                return obj;
            } catch (NumberFormatException unused) {
            }
        }
        String c = c();
        String valueOf = String.valueOf(obj);
        StringBuilder stringBuilder = new StringBuilder(valueOf.length() + (String.valueOf(c).length() + 25));
        stringBuilder.append("Invalid long value for ");
        stringBuilder.append(c);
        stringBuilder.append(": ");
        stringBuilder.append(valueOf);
        Log.e("PhenotypeFlag", stringBuilder.toString());
        return null;
    }
}
